package com.ruoyi.work.domain.vo;

import com.ruoyi.common.utils.Arith;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * @Author: MMDZ
 * @Desc: TODO 人力成本总汇
 */
@Data
@NoArgsConstructor
public class CostCollectionReport extends ReportCondition {
    private String projectCode;//项目代码
    private String deptName;//部门
    private String nickName;//姓名
    private String userName;//工号
    private String postName;//岗位

    private List<Map<String, Double>> stageHour;//阶段工时
    private Double sumHour;//项目合计工时(H)
    private BigDecimal hourPay;//时薪
    private List<Map<String, Double>> stageCost;//阶段成本
    private BigDecimal sumCost;//成本合计

    public CostCollectionReport(String projectCode, String deptName, String nickName, String userName, String postName, List<Map<String, Double>> stageHour, Double sumHour, BigDecimal hourPay, List<Map<String, Double>> stageCost, BigDecimal sumCost) {
        this.projectCode = projectCode;
        this.deptName = deptName;
        this.nickName = nickName;
        this.userName = userName;
        this.postName = postName;
        this.stageHour = stageHour;
        this.sumHour = sumHour;
        this.hourPay = hourPay.setScale(2, BigDecimal.ROUND_HALF_UP);;
        this.stageCost = stageCost;
        this.sumCost = sumCost.setScale(2, BigDecimal.ROUND_HALF_UP);
    }
}
